package com.ladlee.properties;

import com.ladlee.enums.LoginType;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @Auther: dingchang
 * @Date: 2018/12/21 14:56
 * @Description:
 */
@Data
@Component
@ConfigurationProperties(prefix = "ladlee.security")
public class SecurityProperties {

    /**
     * 记住我的有效时间(秒)
     */
    private int rememberMeSeconds = 10; //* 60 * 24 * 7;

    /**
     * 登出跳转地址
     */
    private String signOutUrl = "/ladlee-signOut.html";

    /**
     * 验证码（图片、短信）总配置类
     */
    ValidateCodeProperties code = new ValidateCodeProperties();

    /**
     * 登陆成功之后的处理结果格式(重定向和json数据)
     */
    private LoginType loginType = LoginType.JSON;

    /**
     * session配置过期和并发登录
     */
    private SessionProperties session = new SessionProperties();
}
